package com.heima.day530_面向对象;

public class teacher {
    private String name;
    private int age;
    private String kemu;

    public teacher() {
    }

    public teacher(String name, int age, String kemu) {
        this.name = name;
        this.age = age;
        this.kemu = kemu;
    }
    public void bb(){
        System.out.println("这位老师会物理和化学");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getKemu() {
        return kemu;
    }

    public void setKemu(String kemu) {
        this.kemu = kemu;
    }

    public void show(){
        System.out.println("姓名："+name+"    年龄："+age+"     科目："+kemu);
    }

    public static void main(String[] args) {
        teacher t=new teacher("张三",24,"数学");

        teacher t2=new teacher("老五",23,"英语");
        teacher t3=new teacher("李四",25,"语文");
        t.show();
        t.bb();
        t2.show();
        t3.show();


    }
}
